package settings

import org.springframework.cloud.contract.spec.Contract

Contract.make {
    request {
        method("POST")
        url("/api/uploadImages") {
            multipart(
                    file: named(
                            name: $(c(regex(nonEmpty())), p('file.jpg')),
                            // content of the file
                            content: $(c(regex(nonEmpty())), p('file content')),
                            // content type for the part
                    )
            )
        }
    }
    response {
        status(200)
//        body("""
//                "asdas"
//            """)
        bodyMatchers {
            jsonPath('$', byRegex("[\\s\\S]+"))
        }
    }
}
